using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class BaseResponse : GeneratedMessageLite<BaseResponse, BaseResponse.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<BaseResponse, BaseResponse.Builder>
		{
			private bool resultIsReadOnly;
			private BaseResponse result;
			protected override BaseResponse.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override BaseResponse MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override BaseResponse DefaultInstanceForType
			{
				get
				{
					return BaseResponse.DefaultInstance;
				}
			}
			public int Ret
			{
				get
				{
					return this.result.Ret;
				}
				set
				{
					this.SetRet(value);
				}
			}
			public SKBuiltinString_t ErrMsg
			{
				get
				{
					return this.result.ErrMsg;
				}
				set
				{
					this.SetErrMsg(value);
				}
			}
			public Builder()
			{
				this.result = BaseResponse.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(BaseResponse cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private BaseResponse PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					BaseResponse other = this.result;
					this.result = new BaseResponse();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override BaseResponse.Builder Clear()
			{
				this.result = BaseResponse.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override BaseResponse.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new BaseResponse.Builder(this.result);
				}
				return new BaseResponse.Builder().MergeFrom(this.result);
			}
			public override BaseResponse BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override BaseResponse.Builder MergeFrom(IMessageLite other)
			{
				if (other is BaseResponse)
				{
					return this.MergeFrom((BaseResponse)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override BaseResponse.Builder MergeFrom(BaseResponse other)
			{
				return this;
			}
			public override BaseResponse.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override BaseResponse.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(BaseResponse._baseResponseFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = BaseResponse._baseResponseFieldTags[num2];
					}
					uint num3 = num;
					if (num3 == 0u)
					{
						throw InvalidProtocolBufferException.InvalidTag();
					}
					if (num3 != 8u)
					{
						if (num3 != 18u)
						{
							if (WireFormat.IsEndGroupTag(num))
							{
								return this;
							}
							this.ParseUnknownField(input, extensionRegistry, num, text);
						}
						else
						{
							SKBuiltinString_t.Builder builder = SKBuiltinString_t.CreateBuilder();
							if (this.result.hasErrMsg)
							{
								builder.MergeFrom(this.ErrMsg);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.ErrMsg = builder.BuildPartial();
						}
					}
					else
					{
						this.result.hasRet = input.ReadInt32(ref this.result.ret_);
					}
				}
				return this;
			}
			public BaseResponse.Builder SetRet(int value)
			{
				this.PrepareBuilder();
				this.result.hasRet = true;
				this.result.ret_ = value;
				return this;
			}
			public BaseResponse.Builder ClearRet()
			{
				this.PrepareBuilder();
				this.result.hasRet = false;
				this.result.ret_ = 0;
				return this;
			}
			public BaseResponse.Builder SetErrMsg(SKBuiltinString_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasErrMsg = true;
				this.result.errMsg_ = value;
				return this;
			}
			public BaseResponse.Builder SetErrMsg(SKBuiltinString_t.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasErrMsg = true;
				this.result.errMsg_ = builderForValue.Build();
				return this;
			}
			public BaseResponse.Builder MergeErrMsg(SKBuiltinString_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasErrMsg && this.result.errMsg_ != SKBuiltinString_t.DefaultInstance)
				{
					this.result.errMsg_ = SKBuiltinString_t.CreateBuilder(this.result.errMsg_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.errMsg_ = value;
				}
				this.result.hasErrMsg = true;
				return this;
			}
			public BaseResponse.Builder ClearErrMsg()
			{
				this.PrepareBuilder();
				this.result.hasErrMsg = false;
				this.result.errMsg_ = null;
				return this;
			}
		}
		public const int RetFieldNumber = 1;
		public const int ErrMsgFieldNumber = 2;
		private static readonly BaseResponse defaultInstance;
		private static readonly string[] _baseResponseFieldNames;
		private static readonly uint[] _baseResponseFieldTags;
		private bool hasRet;
		private int ret_;
		private bool hasErrMsg;
		private SKBuiltinString_t errMsg_;
		private int memoizedSerializedSize = -1;
		public static BaseResponse DefaultInstance
		{
			get
			{
				return BaseResponse.defaultInstance;
			}
		}
		public override BaseResponse DefaultInstanceForType
		{
			get
			{
				return BaseResponse.DefaultInstance;
			}
		}
		protected override BaseResponse ThisMessage
		{
			get
			{
				return this;
			}
		}
		public int Ret
		{
			get
			{
				return this.ret_;
			}
		}
		public SKBuiltinString_t ErrMsg
		{
			get
			{
				return this.errMsg_ ?? SKBuiltinString_t.DefaultInstance;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasRet && this.hasErrMsg;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasRet)
				{
					num += CodedOutputStream.ComputeInt32Size(1, this.Ret);
				}
				if (this.hasErrMsg)
				{
					num += CodedOutputStream.ComputeMessageSize(2, this.ErrMsg);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private BaseResponse()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] baseResponseFieldNames = BaseResponse._baseResponseFieldNames;
			if (this.hasRet)
			{
				output.WriteInt32(1, baseResponseFieldNames[1], this.Ret);
			}
			if (this.hasErrMsg)
			{
				output.WriteMessage(2, baseResponseFieldNames[0], this.ErrMsg);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasRet)
			{
				num ^= this.ret_.GetHashCode();
			}
			if (this.hasErrMsg)
			{
				num ^= this.errMsg_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			BaseResponse baseResponse = value as BaseResponse;
			return baseResponse != null && (this.hasRet == baseResponse.hasRet && (!this.hasRet || this.ret_.Equals(baseResponse.ret_))) && (this.hasErrMsg == baseResponse.hasErrMsg && (!this.hasErrMsg || this.errMsg_.Equals(baseResponse.errMsg_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<BaseResponse, BaseResponse.Builder>.PrintField("Ret", this.hasRet, this.ret_, writer);
			GeneratedMessageLite<BaseResponse, BaseResponse.Builder>.PrintField("ErrMsg", this.hasErrMsg, this.errMsg_, writer);
		}
		public static BaseResponse ParseFrom(byte[] data)
		{
			return BaseResponse.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private BaseResponse MakeReadOnly()
		{
			return this;
		}
		public static BaseResponse.Builder CreateBuilder()
		{
			return new BaseResponse.Builder();
		}
		public override BaseResponse.Builder ToBuilder()
		{
			return BaseResponse.CreateBuilder(this);
		}
		public override BaseResponse.Builder CreateBuilderForType()
		{
			return new BaseResponse.Builder();
		}
		public static BaseResponse.Builder CreateBuilder(BaseResponse prototype)
		{
			return new BaseResponse.Builder(prototype);
		}
		static BaseResponse()
		{
			BaseResponse.defaultInstance = new BaseResponse().MakeReadOnly();
			BaseResponse._baseResponseFieldNames = new string[]
			{
				"ErrMsg",
				"Ret"
			};
			BaseResponse._baseResponseFieldTags = new uint[]
			{
				18u,
				8u
			};
			object.ReferenceEquals(micromsg.Proto.BaseResponse.Descriptor, null);
		}
	}
}
